package com.valuegroup.smarttodo.ui.programme.goals;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;

import com.valuegroup.smarttodo.R;
import com.valuegroup.smarttodo.data.DataManager;
import com.valuegroup.smarttodo.data.vo.GoalsTraceSourceVo;
import com.valuegroup.smarttodo.data.vo.TodoVo;
import com.valuegroup.smarttodo.ui.BaseActivity;

import java.util.List;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 目标溯源
 */
public class GoalsTraceSourceActivity extends BaseActivity {

    private GoalsTraceSourceAdapter adapter;

    @BindView(R.id.btnBack)
    ImageButton btnBack;
    @BindView(R.id.labHeaderTitle)
    TextView labHeaderTitle;
    @BindView(R.id.recyclerView)
    RecyclerView recyclerView;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_goals_trace_source);
        ButterKnife.bind(this);

        assert recyclerView != null;
        recyclerView.setHasFixedSize(true);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));

        List<GoalsTraceSourceVo> data = DataManager.getGoalsTraceSourceData();
        adapter = new GoalsTraceSourceAdapter(this, getWindow().getDecorView(),recyclerView, data);
        recyclerView.setAdapter(adapter);
    }

    @OnClick({R.id.btnBack})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btnBack:
                finishAfterTransition();
                break;
        }
    }
}
